//
//  UILabel+labelFrame.m
//  LiveStar
//
//  Created by 漪珊 on 2017/4/28.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "UILabel+labelFrame.h"

@implementation UILabel (labelFrame)
- (CGSize)boundingRectWithSize:(CGSize)size
{
    NSDictionary *attribute = @{NSFontAttributeName: self.font};
    
    CGSize retSize = [self.text boundingRectWithSize:size
                                             options:\
                      NSStringDrawingTruncatesLastVisibleLine |
                      NSStringDrawingUsesLineFragmentOrigin |
                      NSStringDrawingUsesFontLeading
                                          attributes:attribute
                                             context:nil].size;
    
    return retSize;
}
@end
